<?php
declare (strict_types=1);

namespace app\common\model;

class Carousel extends Base
{
    protected function getPositionNameAttr($value, $data): string
    {
        return getPosition($data['position']);
    }

    protected function getTypeNameAttr($value, $data): string
    {
        return match ($data['type']) {
            1 => '图片',
            2 => '视频',
            default => '其他'
        };
    }
}